{extend name="layout:home" /}
{block name="container"}
<div class="layui-tab layui-tab-card">
    {include file="layout/admin_items" /}
    <div class="layui-tab-content page-tab-content">
        <table class="layui-table lay-even">
            <colgroup>
                <col width="150">
                <col width="200">
                <col width="100">
                <col width="100">
                <col width="100">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>{$Think.lang.product_title}</th>
                    <th>{$Think.lang.product_order}</th>
                    <th>{$Think.lang.product_new_ok}</th>
                    <th>{$Think.lang.product_top_ok}</th>
                    <th>{$Think.lang.product_com_ok}</th>
                    <th>{$Think.lang.ds_operation}</th>
                </tr>
            </thead>
            <tbody>
            {volist name="product_list" id="product"}
            <tr>
                <td>{$product.product_title}</td>
                <td><span title="{:lang('ds_editable')}" ajax_branch='product' datatype="number" fieldid="{$product.product_id}" fieldname="product_order" ds_type="inline_edit" class="editable">{$product.product_order}</span></td>
                <td>
                    <a href="javascript:dsLayerConfirm('{:url('product/setproduct',['product_type'=>'product_new_ok','product_id'=>$product.product_id])}','{$Think.lang.ds_confirm_update}')">
                    {if condition="$product.product_new_ok eq 1"}<i class="layui-icon">&#xe605;</i>{else}<i class="layui-icon">&#x1006;</i>{/if}
                    </a>
                </td>
                <td>
                    <a href="javascript:dsLayerConfirm('{:url('product/setproduct',['product_type'=>'product_top_ok','product_id'=>$product.product_id])}','{$Think.lang.ds_confirm_update}')">
                        {if condition="$product.product_top_ok eq 1"}<i class="layui-icon">&#xe605;</i>{else}<i class="layui-icon">&#x1006;</i>{/if}
                    </a>
                </td>
                <td>
                    <a href="javascript:dsLayerConfirm('{:url('product/setproduct',['product_type'=>'product_com_ok','product_id'=>$product.product_id])}','{$Think.lang.ds_confirm_update}')">
                        {if condition="$product.product_com_ok eq 1"}<i class="layui-icon">&#xe605;</i>{else}<i class="layui-icon">&#x1006;</i>{/if}
                    </a>
                </td>
                <td>
                    <a href="{:url('home/product/detail',['product_id'=>$product.product_id])}" target="_blank" class="layui-btn layui-btn-primary layui-btn-xs"><i class="layui-icon layui-icon-list"></i>前台查看</a>
                    <a href="{:url('product/edit',['product_id'=>$product.product_id])}" class="layui-btn layui-btn-xs"><i class="layui-icon layui-icon-edit"></i>{$Think.lang.ds_edit}</a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs" href="javascript:dsLayerConfirm('{:url('product/del',['product_id'=>$product.product_id])}','{$Think.lang.ds_confirm_cancel}')"><i class="layui-icon layui-icon-delete"></i>{$Think.lang.ds_del}</a>
                </td>
            </tr>
            {/volist}
        </tbody>
        </table>
        {$show_page|raw}
    </div>
</div>
<script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js"></script>
{/block}